/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.anny.shop.service;

import java.util.List;


import com.jeeplus.common.beans.ResultBean;
import com.jeeplus.modules.anny.mini.enums.MiniExceptionEnum;
import com.jeeplus.modules.anny.mini.exception.MiniException;
import com.jeeplus.modules.anny.utils.ResultBeanUtil;
import com.jeeplus.modules.sys.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.anny.shop.entity.AnnyShop;
import com.jeeplus.modules.anny.shop.mapper.AnnyShopMapper;

/**
 * 店铺Service
 *
 * @author linzx
 * @version 2018-10-19
 */
@Service
@Transactional(readOnly = true)
public class AnnyShopService extends CrudService<AnnyShopMapper, AnnyShop> {


    @Autowired
    private AnnyShopMapper annyShopMapper;


    @Override
    public AnnyShop get(String id) {
        return super.get(id);
    }

    @Override
    public List<AnnyShop> findList(AnnyShop annyShop) {
        return super.findList(annyShop);
    }

    @Override
    public Page<AnnyShop> findPage(Page<AnnyShop> page, AnnyShop annyShop) {
        return super.findPage(page, annyShop);
    }

    @Override
    @Transactional(readOnly = false)
    public void save(AnnyShop annyShop) {
        super.save(annyShop);
    }

    @Override
    @Transactional(readOnly = false)
    public void delete(AnnyShop annyShop) {
        super.delete(annyShop);
    }


    /**
     * 模糊查询所有店铺
     *
     * @param shopName
     * @return
     */
    public List<AnnyShop> likeShop(String shopName) {

        List<AnnyShop> annyShops = annyShopMapper.likeShop(shopName);

        return annyShops;
    }


    /**
     * 统计店铺数
     *
     * @return
     */
    public List<AnnyShop> businessNum() {
        return annyShopMapper.businessNum();
    }




}